package com.github.data_manage.domain.vo

import cn.idev.excel.annotation.ExcelProperty
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.fasterxml.jackson.databind.annotation.JsonSerialize
import com.github.data_manage.util.ArrayToStringDeSerialize
import com.github.data_manage.util.StringToArraySerialize
import jakarta.persistence.Column
import java.math.BigDecimal
import java.time.LocalDate

/**
 *@author CHN
 *@since 2024-08-10 16:24
 */
open class FundPageVo {

    open var fundId: Int = 0

    open lateinit var fundName: String

    open var fundShortName: String? = null

    open var aum: BigDecimal? = null

    open var companyCity: String? = null

    open var geographicalDistribution: String? = null

    open var mainStrategy: String? = null

    open lateinit var fundCorePersons: List<FundCorePerson>

    open var createDate: String? = null

    open var companyAddress: String? = null

    var currentMonthRequite: BigDecimal? = null

    var currentYearNav: BigDecimal? = null

    // 年化回报
    open var yearNav: BigDecimal? = null

    // 年化标准差
    var yearStandardDeviation: BigDecimal? = null

    //"平均仓位")
    open var averagePosition: String? = null

    //"平均净仓位")
    open var averageNetPosition: String? = null

    open var morePosition: String? = null

    open var emptyPosition: String? = null

    open var topPosition: String? = null

    open var invested: Boolean? = null

    // 手动输入
    open var meetingRate: BigDecimal? = BigDecimal.ZERO

    open var investmentRate: BigDecimal? = BigDecimal.ZERO

    open var riskRate: BigDecimal? = BigDecimal.ZERO

    open var keyManRate: BigDecimal? = BigDecimal.ZERO

    open var businessRate: BigDecimal? = BigDecimal.ZERO

    open var screenOverallRate: BigDecimal? = BigDecimal.ZERO

    @JsonSerialize(using = StringToArraySerialize::class)
    @JsonDeserialize(using = ArrayToStringDeSerialize::class)
    open var parentAum: String? = null

    @JsonSerialize(using = StringToArraySerialize::class)
    @JsonDeserialize(using = ArrayToStringDeSerialize::class)
    open var childAum: String? = null

    open lateinit var fundCode: String

}

data class FundCorePerson(
    val personId: Int,
    val name: String
)
